<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewpoint" content="width=device-width, initial-scale=1.0">
    <title>归档</title>
    <link href="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet">
    <link href="../static/css/myCss.css" rel="stylesheet">
</head>
<body>
<nav th:replace="_fragments :: menu(4)" class="ui inverted attached segment my-padding-tb-mini my-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary menu stackable">
            <h2 class="ui header teal item">Blog</h2>
            <a href="#"  class="my-item item my-mobile-hide">首页</a>
            <a href="#" class="my-item item my-mobile-hide">标签</a>
            <a href="#" class="my-item item my-mobile-hide">分类</a>
            <a href="#" class="active my-item item my-mobile-hide">归档</a>
            <a href="#" class="my-item item my-mobile-hide">关于我</a>

            <div class="right item">
                <div>
                    <div class="ui icon inverted transparent input">
                        <input type="text" placeholder="搜索">
                        <i class="search link icon"></i>

                    </div>
                </div>

                <button class="ui button" style="margin-left: 1em !important;">注册/登陆</button>
            </div>

        </div>
    </div>
    <a href="#" class="menu tooggle ui icon black button my-top-right my-mobile-show"><i class="sidebar icon"></i></a>
</nav>


<div class="my-padding-tb-large my-container-small">
    <div class="ui container">
        <!--        头部 header-->
        <div class="ui segment top attached padded animated fadeInUp">
            <div class="ui middle aligned two column grid  ">
                <div class="column">
                    <div class="ui teal header ">归档</div>
                </div>

                <!--标签总量-->
                <div class="column right aligned">
                    共 <span class="ui orange header m-inline-block m-text-thin" th:text="${blogCount}"> 114 </span> 篇博客
                </div>
            </div>
        </div>

        <th:block th:each="item : ${archiveMap}" class="animated fadeInUp">
            <h3 class="ui header center aligned animated fadeInUp" th:text="${item.key}">2017</h3>
            <div class="animated fadeInUp">
                <div class="ui vertical menu fluid">
                    <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item" th:each="blog : ${item.value}">
                        <i class="mini teal circle icon"></i><span th:text="${blog.title}">安安啊啊 </span>
                        <div class="ui label left pointing basic my-padding-tb-mini" th:text="${#dates.format(blog.updateTime,'MMMdd')}">6月5日</div>
                    </a>
                </div>
            </div>
        </th:block>
    </div>
</div>

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.js"></script>
<script>
    $('.menu.tooggle').click(function () {
        $('.my-item').toggleClass('my-mobile-hide');
    });
</script>
</body>
</html>